/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */
package info.peigen.hotpot.business.product.core.domain;

import info.peigen.hotpot.business.product.facade.enums.ProductSkuType;
import info.peigen.hotpot.business.product.facade.enums.ProductStatus;
import info.peigen.hotpot.common.core.domain.DomainObject;
import info.peigen.hotpot.common.core.enums.SortType;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.FieldDefaults;
import lombok.experimental.SuperBuilder;

import java.util.List;

/**
 * <b>(ProductStockKeepingUnit)</b>
 * SKU（Stock Keeping Unit，即库存量单位）
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2023/11/29
 */
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Data
@NoArgsConstructor
@AllArgsConstructor
@FieldDefaults(level = AccessLevel.PRIVATE)
@Accessors(chain = true)
public class ProductStockKeepingUnit extends DomainObject {
    /** spuId */
    @NotEmpty
    String         spuId;
    /** skuId */
    @NotEmpty
    String         skuId;
    /** 商品名称 */
    @NotEmpty
    String         name;
    /** 商品介绍 */
    @NotEmpty
    String         detail;
    /** 商品类型 */
    @NotNull
    ProductSkuType type;
    /** 商品属性 */
    List<ProductProperty> properties;
    /** 上架状态 */
    @Builder.Default
    ProductStatus status = ProductStatus.Not_On_Sell;
    /** 排序 */
    @Builder.Default
    SortType      sort   = SortType.DESC;
    /** 操作员 */
    String operatorId;
}